﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Document_Management.tianche;

namespace Document_Management
{
    public partial class frm天車功能 : Form
    {
        TextBox tx;
        public frm天車功能(TextBox tx)
        {
            InitializeComponent();
            this.tx = tx;
        }
        
       

        private void 天車功能_Load(object sender, EventArgs e)
        {
            PublicClass.LoadAllNoneProcedure("天車功能", _dtgv天車功能);
        }

        private void _dtgv天車功能_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            PublicClass.setRowNumber(_dtgv天車功能);
        }

        private void btn_OK_天車功能_Click(object sender, EventArgs e)
        {
            try
            {
                int r = _dtgv天車功能.CurrentCell.RowIndex;
                string id = _dtgv天車功能.Rows[r].Cells[0].Value.ToString();
                tx.Text = id;
                this.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
     
    }
}
